package com.xxjqr.rbac.task;

import com.xxjqr.rbac.entity.pojo.TbOperLog;
import com.xxjqr.rbac.mapper.TbSysOperLogMapper;
import com.xxjqr.rbac.util.SpringUtil;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

@Component
public class AsyncTask {

    /***
     * @描述 异步插入系统操作日志
     * @码农 丁昌江
     * @日期 2021/5/5 10:13
     * @param sysOperLog
     * @返回 void
     */
    @Async("asyncExecutor")
    public void insertOperLog(TbOperLog sysOperLog) {
        TbSysOperLogMapper sysOperLogMapper = SpringUtil.getBean("tbSysOperLogMapper");
        sysOperLogMapper.insert(sysOperLog);
    }
}
